package com.henry.c05.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;

@Aspect
public class MyAop {
    @Pointcut(value="execution(* com.henry.c05.model.School.*ding(..))")
    public void point() throws  Throwable{

    }
    @Before(value = "point()")
    public void before(){
        System.out.println("print from MyAop.before(）");
    }

    @AfterReturning(value = "point()")
    public void afterReturning(){
        System.out.println("print from MyAop.afterReturning()");
    }
    @After(value = "point()")
    public void after(){
        System.out.println("print from MyAop.after()");
    }

    @Around("point()")
    public void around(ProceedingJoinPoint joinPoint) throws  Throwable{
        System.out.println("print from MyAop.around-start");
        joinPoint.proceed();
        System.out.println("print from MyAop.around-end");
    }
}
